﻿using KmFlow;

namespace Demo.Api.Entities
{
    /// <summary>
    ///     线表
    /// </summary>
    public class LineDo : BaseDo
    {
        /// <summary>
        ///     流程图的Id
        /// </summary>
        public long FlowChartId { get; set; }

        /// <summary>
        ///     头部节点Id
        /// </summary>
        public long HeadNodeId { get; set; }

        /// <summary>
        ///     尾部节点Id
        /// </summary>
        public long TailNodeId { get; set; }

        /// <summary>
        ///     线的类型
        /// </summary>
        public int LineType { get; set; }

        /// <summary>
        ///     名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        ///     编码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        ///     说明
        /// </summary>
        public string Remarks { get; set; }

        public Line ToLine()
        {
            return new Line() { Code = Code, TailNodeId = TailNodeId, HeadNodeId = HeadNodeId, LineType = (LineType)LineType, Id = Id };
        }
    }
}